From 1569997010aff99cd5c07c7912ca13f83ae6058a Mon Sep 17 00:00:00 2001 From: "cl349@freefall.cl.cam.ac.uk" Date: Fri, 24 Sep 2004 14:24:33 +0000 Subject: [PATCH] bitkeeper revision 1.1159.83.9 (41542e212WOTlwxlL6GYzK1_CRdC4g) Fix writable pagetable revalidation check for when a page is made readonly. --- xen/arch/x86/memory.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/xen/arch/x86/memory.c b/xen/arch/x86/memory.c index e08b75e3c2..8cb0b42366 100644 --- a/xen/arch/x86/memory.c +++ b/xen/arch/x86/memory.c @@ -1644,12 +1644,12 @@ void ptwr_flush(const int which) l1_pgentry_t ol1e, nl1e; nl1e = ptwr_info[cpu].ptinfo[which].page[i]; ol1e = pl1e[i]; - if (likely(l1_pgentry_val(nl1e) == l1_pgentry_val(ol1e))) + if (likely(l1_pgentry_val(ol1e) == l1_pgentry_val(nl1e))) continue; - if (likely(l1_pgentry_val(nl1e) == (l1_pgentry_val(ol1e) | _PAGE_RW))) + if (likely(l1_pgentry_val(ol1e) == (l1_pgentry_val(nl1e) | _PAGE_RW))) { if (likely(readonly_page_from_l1e(nl1e))) { - pl1e[i] = ptwr_info[cpu].ptinfo[which].page[i]; + pl1e[i] = nl1e; continue; } } @@ -1659,7 +1659,7 @@ void ptwr_flush(const int which) MEM_LOG("ptwr: Could not re-validate l1 page\n"); domain_crash(); } - pl1e[i] = ptwr_info[cpu].ptinfo[which].page[i]; + pl1e[i] = nl1e; } unmap_domain_mem(pl1e); -- 2.30.2